package com.eke.bean;

import com.jason.dbhelper2.annotations.Column;
import com.jason.dbhelper2.annotations.Table;
import com.jason.dbhelper2.jdbc.ActiveRecord;
@Table("goods")
public class Goods extends ActiveRecord<Goods>{
	/**
	 * 商品ID
	 *
	 */
	@Column("id")
	private Integer id;
	/**
	 * 商品名
	 *
	 */
	@Column("goods_name")
	private String goodsName;
	/**
	 * 商品总数
	 *
	 */
	@Column("goods_score")
	private String goodsScore;
	/**
	 * 图片（url）
	 *
	 */
	@Column("goods_url")
	private String goodsUrl;
	/**
	 * 商品分类id
	 *
	 */
	@Column("goods_classify_id")
	private Integer goodsClassifyId;
	/**
	 * 状态（0销毁 1未销毁）
	 *
	 */
	@Column("goods_state")
	private String goodsState;
	/**
	 * 用户ID
	 *
	 */
	@Column("user_id")
	private Integer userId;
	/**
	 * 商品积分
	 *
	 */
	@Column("goods_integral")
	private Integer goodsIntegral;
	public Goods(){
	}
	public Goods(Integer id){
		this.id=id;
	}
	public Goods(Integer id,String goodsName){
		this.id=id;
		this.goodsName=goodsName;
	}
	public Goods(Integer id,String goodsName,String goodsScore){
		this.id=id;
		this.goodsName=goodsName;
		this.goodsScore=goodsScore;
	}
	public Goods(Integer id,String goodsName,String goodsScore,String goodsUrl){
		this.id=id;
		this.goodsName=goodsName;
		this.goodsScore=goodsScore;
		this.goodsUrl=goodsUrl;
	}
	public Goods(Integer id,String goodsName,String goodsScore,String goodsUrl,Integer goodsClassifyId){
		this.id=id;
		this.goodsName=goodsName;
		this.goodsScore=goodsScore;
		this.goodsUrl=goodsUrl;
		this.goodsClassifyId=goodsClassifyId;
	}
	public Goods(Integer id,String goodsName,String goodsScore,String goodsUrl,Integer goodsClassifyId,String goodsState){
		this.id=id;
		this.goodsName=goodsName;
		this.goodsScore=goodsScore;
		this.goodsUrl=goodsUrl;
		this.goodsClassifyId=goodsClassifyId;
		this.goodsState=goodsState;
	}
	public Goods(Integer id,String goodsName,String goodsScore,String goodsUrl,Integer goodsClassifyId,String goodsState,Integer userId){
		this.id=id;
		this.goodsName=goodsName;
		this.goodsScore=goodsScore;
		this.goodsUrl=goodsUrl;
		this.goodsClassifyId=goodsClassifyId;
		this.goodsState=goodsState;
		this.userId=userId;
	}
	public Goods(Integer id,String goodsName,String goodsScore,String goodsUrl,Integer goodsClassifyId,String goodsState,Integer userId,Integer goodsIntegral){
		this.id=id;
		this.goodsName=goodsName;
		this.goodsScore=goodsScore;
		this.goodsUrl=goodsUrl;
		this.goodsClassifyId=goodsClassifyId;
		this.goodsState=goodsState;
		this.userId=userId;
		this.goodsIntegral=goodsIntegral;
	}
	/**
	 * 获取商品ID
	 */
	public Integer getId(){
		return id;
	}
	/**
	 * 设置商品ID
	 */
	public void setId(Integer id){
		this.id=id;
	}
	/**
	 * 获取商品名
	 */
	public String getGoodsName(){
		return goodsName;
	}
	/**
	 * 设置商品名
	 */
	public void setGoodsName(String goodsName){
		this.goodsName=goodsName;
	}
	/**
	 * 获取商品总数
	 */
	public String getGoodsScore(){
		return goodsScore;
	}
	/**
	 * 设置商品总数
	 */
	public void setGoodsScore(String goodsScore){
		this.goodsScore=goodsScore;
	}
	/**
	 * 获取图片（url）
	 */
	public String getGoodsUrl(){
		return goodsUrl;
	}
	/**
	 * 设置图片（url）
	 */
	public void setGoodsUrl(String goodsUrl){
		this.goodsUrl=goodsUrl;
	}
	/**
	 * 获取商品分类id
	 */
	public Integer getGoodsClassifyId(){
		return goodsClassifyId;
	}
	/**
	 * 设置商品分类id
	 */
	public void setGoodsClassifyId(Integer goodsClassifyId){
		this.goodsClassifyId=goodsClassifyId;
	}
	/**
	 * 获取状态（0销毁 1未销毁）
	 */
	public String getGoodsState(){
		return goodsState;
	}
	/**
	 * 设置状态（0销毁 1未销毁）
	 */
	public void setGoodsState(String goodsState){
		this.goodsState=goodsState;
	}
	/**
	 * 获取用户ID
	 */
	public Integer getUserId(){
		return userId;
	}
	/**
	 * 设置用户ID
	 */
	public void setUserId(Integer userId){
		this.userId=userId;
	}
	/**
	 * 获取商品积分
	 */
	public Integer getGoodsIntegral(){
		return goodsIntegral;
	}
	/**
	 * 设置商品积分
	 */
	public void setGoodsIntegral(Integer goodsIntegral){
		this.goodsIntegral=goodsIntegral;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((goodsName == null) ? 0 : goodsName.hashCode());
		result = prime * result + ((goodsScore == null) ? 0 : goodsScore.hashCode());
		result = prime * result + ((goodsUrl == null) ? 0 : goodsUrl.hashCode());
		result = prime * result + ((goodsClassifyId == null) ? 0 : goodsClassifyId.hashCode());
		result = prime * result + ((goodsState == null) ? 0 : goodsState.hashCode());
		result = prime * result + ((userId == null) ? 0 : userId.hashCode());
		result = prime * result + ((goodsIntegral == null) ? 0 : goodsIntegral.hashCode());
		return result;
	}
		
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Goods other = (Goods) obj;
		if (goodsName == null) {
			if (other.goodsName != null)
				return false;
		} else if (!goodsName.equals(other.goodsName))
			return false;
		if (goodsScore == null) {
			if (other.goodsScore != null)
				return false;
		} else if (!goodsScore.equals(other.goodsScore))
			return false;
		if (goodsUrl == null) {
			if (other.goodsUrl != null)
				return false;
		} else if (!goodsUrl.equals(other.goodsUrl))
			return false;
		if (goodsState == null) {
			if (other.goodsState != null)
				return false;
		} else if (!goodsState.equals(other.goodsState))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Goods [id=" + id+",goodsName=" + goodsName+",goodsScore=" + goodsScore+",goodsUrl=" + goodsUrl+",goodsClassifyId=" + goodsClassifyId+",goodsState=" + goodsState+",userId=" + userId+",goodsIntegral=" + goodsIntegral+"]";
	}
	@Override
	public String[] getPrimaryKeys() {
		// TODO Auto-generated method stub
		return new String[]{"id"};
	}





}